import api from '../utils/axios'
import qs from 'qs'

export default {

    /*  定存  */
  paymentOrder: function ({payPwd = '',id="",payMode=1, amount=0}) {
      return api.post('/api/block/v/paymentOrder', {payPwd,id,payMode}).then((resp) => {
            return Promise.resolve(resp.data)
        })
    },

    /*  定存列表  */
  orderList: function ({pageSize=1,pageNum=10}) {
      return api.post('/api/block/v/orderList', {pageSize,pageNum}).then((resp) => {
            return Promise.resolve(resp.data)
        })
    },


    /*  转账  */
  doTransfer: function ({name = '',amount='',code=''}) {
      return api.post('/api/block/transfer/v/doTransfer', {name,amount,code}).then((resp) => {
            return Promise.resolve(resp.data)
        })
    },

    /*  转账记录  */
  transferList: function ({pageSize=1,pageNum=10}) {
      return api.post('/api/block/transfer/v/transferList', {pageSize,pageNum}).then((resp) => {
            return Promise.resolve(resp.data)
        })
    },


    /*  账户余额  */
  findBalances: function ({}) {
      return api.post('/api/block/transfer/v/findBalances', {}).then((resp) => {
            return Promise.resolve(resp.data)
        })
    },


 /*  ngt代出  */
  takeNgt: function ({id=1, type =3,amount=100,code=111111}) {
      return api.post('/api/block/v/takeNgt', {id, name, amount, code}).then((resp) => {
            return Promise.resolve(resp.data)
        })
    },

}
